/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CU007.java
 *
 * Created on 03/11/2012, 14:27:07
 */
package victory;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 *
 * @author Loreley
 */
public class CU007 extends javax.swing.JPanel {

    /** Creates new form CU007 */
    public CU007() {
        initComponents();
        boton_cancelar.addActionListener(new ActionListener(){
            public void actionPerformed (ActionEvent e){
                System.out.println("lalalalala boton cancelar");
        }
        });
        boton_guardar.addActionListener(new ActionListener(){
            public void actionPerformed (ActionEvent e){
                System.out.println("lalalalala boton guardar");
        }
        });
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        label_correoElectronico = new javax.swing.JLabel();
        label_titulo = new javax.swing.JLabel();
        apellido = new javax.swing.JTextField();
        localidad = new javax.swing.JTextField();
        label_nombre = new javax.swing.JLabel();
        label_localidad = new javax.swing.JLabel();
        correoElectronico = new javax.swing.JTextField();
        label_tipoDocumento = new javax.swing.JLabel();
        nombre = new javax.swing.JTextField();
        cb_tipoDocumento = new javax.swing.JComboBox();
        cb_provincia = new javax.swing.JComboBox();
        boton_cancelar = new javax.swing.JButton();
        label_provincia = new javax.swing.JLabel();
        numeroDocumento = new javax.swing.JTextField();
        label_apellido = new javax.swing.JLabel();
        label_numeroDocumento = new javax.swing.JLabel();
        boton_guardar = new javax.swing.JButton();

        setMinimumSize(new java.awt.Dimension(800, 600));
        setName("Form"); // NOI18N

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(victory.VictoryApp.class).getContext().getResourceMap(CU007.class);
        label_correoElectronico.setText(resourceMap.getString("label_correoElectronico.text")); // NOI18N
        label_correoElectronico.setName("label_correoElectronico"); // NOI18N

        label_titulo.setFont(resourceMap.getFont("label_titulo.font")); // NOI18N
        label_titulo.setText(resourceMap.getString("label_titulo.text")); // NOI18N
        label_titulo.setName("label_titulo"); // NOI18N

        apellido.setName("apellido"); // NOI18N

        localidad.setName("localidad"); // NOI18N

        label_nombre.setText(resourceMap.getString("label_nombre.text")); // NOI18N
        label_nombre.setName("label_nombre"); // NOI18N

        label_localidad.setText(resourceMap.getString("label_localidad.text")); // NOI18N
        label_localidad.setName("label_localidad"); // NOI18N

        correoElectronico.setEditable(false);
        correoElectronico.setName("correoElectronico"); // NOI18N

        label_tipoDocumento.setText(resourceMap.getString("label_tipoDocumento.text")); // NOI18N
        label_tipoDocumento.setName("label_tipoDocumento"); // NOI18N

        nombre.setName("nombre"); // NOI18N

        cb_tipoDocumento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "DNI", "LC", "LE" }));
        cb_tipoDocumento.setName("cb_tipoDocumento"); // NOI18N

        cb_provincia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "<Seleccione una>", "Santa Fe", "Buenos Aires", "Entre Rios", "Cordoba", "Mendoza", "San Luis", "Santiago del Estero", "Chaco", "Corrientes", "Jujuy", "Salta", "Misiones", "Formosa", "Neuquen", "Rio Negro", "Tierra del Fuego", "Chubut", "Santa Cruz", "Rio Negro", "Catamarca", "La Rioja" }));
        cb_provincia.setName("cb_provincia"); // NOI18N

        boton_cancelar.setText(resourceMap.getString("boton_cancelar.text")); // NOI18N
        boton_cancelar.setName("boton_cancelar"); // NOI18N
        boton_cancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boton_cancelarActionPerformed(evt);
            }
        });

        label_provincia.setText(resourceMap.getString("label_provincia.text")); // NOI18N
        label_provincia.setName("label_provincia"); // NOI18N

        numeroDocumento.setName("numeroDocumento"); // NOI18N

        label_apellido.setText(resourceMap.getString("label_apellido.text")); // NOI18N
        label_apellido.setName("label_apellido"); // NOI18N

        label_numeroDocumento.setText(resourceMap.getString("label_numeroDocumento.text")); // NOI18N
        label_numeroDocumento.setName("label_numeroDocumento"); // NOI18N

        boton_guardar.setText(resourceMap.getString("boton_guardar.text")); // NOI18N
        boton_guardar.setName("boton_guardar"); // NOI18N
        boton_guardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boton_guardarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(51, 51, 51)
                .addComponent(label_titulo)
                .addContainerGap(421, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(boton_guardar)
                        .addGap(20, 20, 20)
                        .addComponent(boton_cancelar))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(73, 73, 73)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(layout.createSequentialGroup()
                                .addGap(11, 11, 11)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(label_nombre)
                                    .addComponent(label_provincia)
                                    .addComponent(label_localidad)
                                    .addComponent(label_tipoDocumento))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                        .addComponent(cb_tipoDocumento, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 57, Short.MAX_VALUE)
                                        .addComponent(label_numeroDocumento)
                                        .addGap(18, 18, 18)
                                        .addComponent(numeroDocumento, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(localidad, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE)
                                    .addComponent(nombre, javax.swing.GroupLayout.PREFERRED_SIZE, 349, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(cb_provincia, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(label_correoElectronico)
                                    .addComponent(label_apellido))
                                .addGap(18, 18, 18)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(apellido, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE)
                                    .addComponent(correoElectronico, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE))))))
                .addGap(174, 174, 174))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addComponent(label_titulo)
                .addGap(36, 36, 36)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(label_correoElectronico)
                    .addComponent(correoElectronico, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(14, 14, 14)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(label_apellido)
                    .addComponent(apellido, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(label_nombre)
                    .addComponent(nombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(17, 17, 17)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(cb_tipoDocumento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_tipoDocumento)
                    .addComponent(numeroDocumento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(label_numeroDocumento))
                .addGap(12, 12, 12)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(label_provincia)
                    .addComponent(cb_provincia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(14, 14, 14)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(label_localidad)
                    .addComponent(localidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(31, 31, 31)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(boton_guardar)
                    .addComponent(boton_cancelar))
                .addContainerGap(57, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void boton_guardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boton_guardarActionPerformed
        // TODO add your handling code here:
        
        //REALIZAR EL PROCESO DE GUARDAR Y LUEGO VUELVE A LA PANTALLA DE INICIO
        System.out.println("Esta guardando los datos...");
        this.removeAll();
        this.repaint();  
    }//GEN-LAST:event_boton_guardarActionPerformed

    private void boton_cancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boton_cancelarActionPerformed
        // TODO add your handling code here:
        this.removeAll();
        this.repaint();  
    }//GEN-LAST:event_boton_cancelarActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField apellido;
    private javax.swing.JButton boton_cancelar;
    private javax.swing.JButton boton_guardar;
    private javax.swing.JComboBox cb_provincia;
    private javax.swing.JComboBox cb_tipoDocumento;
    private javax.swing.JTextField correoElectronico;
    private javax.swing.JLabel label_apellido;
    private javax.swing.JLabel label_correoElectronico;
    private javax.swing.JLabel label_localidad;
    private javax.swing.JLabel label_nombre;
    private javax.swing.JLabel label_numeroDocumento;
    private javax.swing.JLabel label_provincia;
    private javax.swing.JLabel label_tipoDocumento;
    private javax.swing.JLabel label_titulo;
    private javax.swing.JTextField localidad;
    private javax.swing.JTextField nombre;
    private javax.swing.JTextField numeroDocumento;
    // End of variables declaration//GEN-END:variables
}
